﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using Mangosoft.DiceCopy.Presentation.ServiceAgents.JobHuntingService;
using System.Diagnostics;

namespace Mangosoft.DiceCopy.Presentation.ServiceAgents {
    public class SalesServiceAgent {
        //public string Say123(int hello) {
        //    string say123 = string.Empty;
        //    Service1Client proxy = new Service1Client();
        //    try {
        //        say123 = proxy.GetData(123);
        //    }
        //    catch (FaultException<ProcessExecutionFault> ex) {
        //        throw new ApplicationException(ex.Message);
        //    }



        //    say123 = proxy.GetData(hello);

        //    return say123;
        //}

        public string SayHello(string hello) {
            JobHuntingModuleServiceClient client = new JobHuntingModuleServiceClient();

            return client.SayHello("Hello,");
        }

        public TalentDTO[] FindTalents() {

            try {
                JobHuntingModuleServiceClient client = new JobHuntingModuleServiceClient();
                return client.FindTalents();
            }
            catch (FaultException<ServiceError> excep) {
                Debug.WriteLine("GetCustomerOrders: Error at Service:" + excep.ToString());
            }

            return null;
        }

        public TalentDTO FindTalent(Guid id) {
            JobHuntingModuleServiceClient client = new JobHuntingModuleServiceClient();

            return client.FindTalent(id);
        }


    }
}
